import { Component, OnInit, Input } from "@angular/core";
import { AppGlobalService } from "src/app/shared/service/app-global.service";

@Component({
  selector: "app-more-button",
  templateUrl: "./more-button.component.html",
  styleUrls: ["./more-button.component.scss"]
})
export class MoreButtonComponent implements OnInit {
  @Input() tagData: any;

  constructor(private appGlobalService: AppGlobalService) {}

  ngOnInit() {}

  handleClick(item) {
    if (item) {
      const sessionId = localStorage.getItem("sessionId");
      const pageParams = {
        pageId: item.target,
        params: item.params,
        sessionId
      };
      this.appGlobalService.goToForward(pageParams);
    }
  }
}
